<template>
  <div  @click="login" class="btn" :class="[{primary:type=='primary'},{primary:type=='success'},{primary:type=='danger'}]">
      <slot>登录</slot>
  </div>
</template>

<script>
export default {
    /* props:{
        text:{
            type: String,
            default:"按钮"
        }
    } */
    props:{
        type: {
            type: String
        }
    },
    methods:{
        login(){
            this.$emit("click")
        }
    }
}
</script>

<style scoped lang="less">
.btn{
     width:90%;
     margin: 0 auto;
  height: 50px;
  border: none;
  outline: none;
//   border-bottom: 2px solid #ccc;
  font-size: 18px;
  background-color: red;
  text-align: center;
  line-height: 50px;
  color: #fff;
 border-radius: 30px;
}
 .primary {
  background-color: rgb(33, 88, 182);
  color: #fff;
}
.success {
  background-color: rgb(33, 182, 33);
  color: #fff;
}
.danger {
  background-color: rgb(193, 60, 37);
  color: #fff;
}

</style>